package com.ruoyi.school.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.school.mapper.SchoolImagesMapper;
import com.ruoyi.school.domain.SchoolImages;
import com.ruoyi.school.service.ISchoolImagesService;

/**
 * 图说商贸学校Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-31
 */
@Service
public class SchoolImagesServiceImpl implements ISchoolImagesService 
{
    @Autowired
    private SchoolImagesMapper schoolImagesMapper;

    /**
     * 查询图说商贸学校
     * 
     * @param id 图说商贸学校主键
     * @return 图说商贸学校
     */
    @Override
    public SchoolImages selectSchoolImagesById(Long id)
    {
        return schoolImagesMapper.selectSchoolImagesById(id);
    }

    /**
     * 查询图说商贸学校列表
     * 
     * @param schoolImages 图说商贸学校
     * @return 图说商贸学校
     */
    @Override
    public List<SchoolImages> selectSchoolImagesList(SchoolImages schoolImages)
    {
        return schoolImagesMapper.selectSchoolImagesList(schoolImages);
    }

    /**
     * 新增图说商贸学校
     * 
     * @param schoolImages 图说商贸学校
     * @return 结果
     */
    @Override
    public int insertSchoolImages(SchoolImages schoolImages)
    {
        schoolImages.setCreateTime(DateUtils.getNowDate());
        return schoolImagesMapper.insertSchoolImages(schoolImages);
    }

    /**
     * 修改图说商贸学校
     * 
     * @param schoolImages 图说商贸学校
     * @return 结果
     */
    @Override
    public int updateSchoolImages(SchoolImages schoolImages)
    {
        schoolImages.setUpdateTime(DateUtils.getNowDate());
        return schoolImagesMapper.updateSchoolImages(schoolImages);
    }

    /**
     * 批量删除图说商贸学校
     * 
     * @param ids 需要删除的图说商贸学校主键
     * @return 结果
     */
    @Override
    public int deleteSchoolImagesByIds(Long[] ids)
    {
        return schoolImagesMapper.deleteSchoolImagesByIds(ids);
    }

    /**
     * 删除图说商贸学校信息
     * 
     * @param id 图说商贸学校主键
     * @return 结果
     */
    @Override
    public int deleteSchoolImagesById(Long id)
    {
        return schoolImagesMapper.deleteSchoolImagesById(id);
    }
}
